<?php
if(have_posts())
{
	while (have_posts())
	{
		the_post();
		$post_id = get_the_ID();
		$title = get_the_title($post_id);
		$perlink = get_permalink($post_id);
		$alt = db_get_alt_attachment_id($post_id, $wpdb->prefix.'thumbnail');
		if(!$alt)
			$alt = db_vietnamese_slug($title);
		$thumbnail = db_get_post_meta($post_id, $wpdb->prefix.'thumbnail');
		$trusochinh = get_post_meta($post_id,$wpdb->prefix.'tru-so-chinh',true);
		$dienthoai = get_post_meta($post_id,$wpdb->prefix.'dien-thoai',true);
		$fax = get_post_meta($post_id,$wpdb->prefix.'fax',true);
		$email = get_post_meta($post_id,$wpdb->prefix.'email',true);
		?>
		
					<div class="box1-kh">
						<a href="<?php echo $perlink;?>" title="<?php echo $title;?>">
							<?php echo db_get_thumbnail($thumbnail,$alt,215,125);?>
							
						</a>
						<div class="right_img_kh">
							<p><a href="<?php echo $perlink;?>" title="<?php echo $title;?>"><?php echo $title;?></a></p><br />
							<b>Địa chỉ trụ sở chính:</b><?php echo $trusochinh;?><br />
							<b>Điện thoại:</b> <?php echo $dienthoai;?><?php if($fax) echo ', Fax: '.$fax;?><?php if($email) echo ', Email: '.$email;?><br />
							<?php echo db_shortDesc(get_the_content(), 100);?><br />
							<a href="<?php echo $perlink;?>" title="<?php echo $title;?>">Xem tiếp...</a>
						</div>
					</div>
		<?php 	
	}
}
?>